<form id="mediFilterForm" action="<?=MozgRoute::Get('http')->Create($this->baseUrlParams, false, $leftParams);?>" method="get">
<div style="padding: 15px ;">
	<div id="tagsSuggest" class="tagBox filter-row">
		По тэгам<br>
		<input name="media_filter_tags" id="tags" class="tagBoxInput" type="text" value="<?=htmlspecialchars($this->filter->GetTags());?>" style="width: 100%;">
	</div>
	<div class="filter-row">
		Начиная с даты<br>
		<input name="media_filter_from_date" type="text" value="<?=htmlspecialchars($this->filter->GetFromDate() ? $this->filter->GetFromDate() : '');?>">
	</div>	
	<div class="filter-row">
		Заканчивая датой<br>
		<input name="media_filter_to_date" type="text" value="<?=htmlspecialchars($this->filter->GetToDate() ? $this->filter->GetToDate() : '');?>">
	</div>	
	<?=$this->Style()->IncludeStyleFile(array('js' => 'tagdragon'));?>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#tagsSuggest').tagdragon({'field':'tags',
			 'max':10,
			 'charMin':2,
			 'url':'<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'articles', 'action' => 'tags_list', 'blog' => 0));?>'});	 
	});
	</script>
	<table>
		<tr>
			<td class="r"><input type="submit" class="bt" value="Искать" /></td>
			<td class="l"><input type="button" id="mediaFilterResetButton" value="Сбросить" class="bt" /></td>
		</tr>
	</table>
</div>
<?=MozgRoute::Get('http')->CreateInputs($leftParams);?>
</form>
<script type="text/javascript">
	$('#mediaFilterResetButton').click(MediaFilterRedirect);

	function MediaFilterRedirect()
	{
<?php 

$mediaRedirectLink = MozgRoute::Get('http')->Create(array_merge($this->baseUrlParams, array('resetmediafilter' => 1)));

?>		
		window.location.href='<?=$mediaRedirectLink;?>';		
	}		
</script>